﻿using System;
using System.Windows;
using System.Windows.Controls;
using MediaBrowser.Gui.MvvmUtils.UI;

namespace MediaBrowser.Gui.Views
{
    /// <summary>
    /// Logique d'interaction pour PagePicturesView.xaml
    /// </summary>
    public partial class PagePicturesView : UserControl
    {
        public PagePicturesView()
        {
            using (new CustomWaitCursor())
            {
                InitializeComponent();
                rdAll.IsChecked = true;               
            }
        }

        #region Filtres

        private void rd_Checked(object sender, RoutedEventArgs e)
        {
            if (this.scrollerControl != null)
            {
                if (sender.Equals(this.rdAll))
                {
                    this.scrollerControl.MemberCheckFilterBinding = String.Empty;
                }
                else if (sender.Equals(this.rdWithDescription))
                {
                    this.scrollerControl.ValueCheckFilter = true;
                    this.scrollerControl.MemberCheckFilterBinding = "Description";
                }
                else if (sender.Equals(this.rdWithoutDescription))
                {
                    this.scrollerControl.ValueCheckFilter = false;
                    this.scrollerControl.MemberCheckFilterBinding = "Description";
                }
            }
        }

        #endregion
    }
}
